package com.ruoyi.system.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.ruoyi.system.domain.YhDetails;
import com.ruoyi.system.domain.YhScanCodeRecord;
import com.ruoyi.system.domain.vo.YhDetailsVo;
import com.ruoyi.system.domain.vo.YhScanCodeRecordVo;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * 烟盒信息Mapper接口
 * 
 * @author ruoyi
 * @date 2023-06-06
 */
public interface YhDetailsMapper extends BaseMapper<YhDetails>
{

    @Select("SELECT d.*, t.type FROM yh_details d " +
            "LEFT JOIN yh_type t on d.type_id = t.id ${ew.customSqlSegment}")
    List<YhDetailsVo> yhDetailsList(@Param(Constants.WRAPPER) QueryWrapper<YhDetails> queryWrapper);
}
